<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文本事件</title>
</head>
<body>
    <input type="text">
</body>
<script>
    // oninput
    // focus
    // blur
    // onchange

    var input = document.getElementsByTagName('input')[0];

    // input.oninput = function () {
    //  console.log(this.value);
    // }

    input.onchange = function() {
        console.log(this.value);
    }
</script>
</html>
